
package ch.hearc.coursJava.kitBase.tools;

public class NombreTools
	{

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	public static boolean isEgal(double a, double b, double epsilon)
		{
		if (b == 0 || a == 0)
			{
			return Math.abs(a - b) <= epsilon;
			}
		else
			{
			return Math.abs((a - b) / b) <= epsilon;
			}
		}

	public static boolean isEgal(double a, double b)
		{
		return a == b;
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	}
